import request from '@/utils/request'

export function getListPage(params) {
    return request({
      url: '/operate/firstpageFloors',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': params.pageNum,
        'pageSize': params.pageSize
      },
      method: 'get',
      params:params
    })
  }
  
  export function delOperation(rowId) {
    return request({
        url: '/operate/firstpageFloors/'+rowId,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'delete',
    })
  }
  export function addImg(data) {
    return request({
      url: '/ids/pub/file/uploadFile',
      headers: {
        'Content-Type': 'multipart/form-data'
      },
      method: 'post',
      data
    })
  }
  
  export function getzhutiList() {
    return request({
      url: '/operate/firstpageRecommends/list',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': 1,
        'pageSize': 10
      },
      method: 'get',
    })
  }
  
  export function getImgList() {
    return request({
      url: '/operate/firstpagePicss/list',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': 1,
        'pageSize': 10
      },
      method: 'get',
    })
  }
  export function getDetails(params) {
    return request({
      url: '/operate/firstpageFloors/getFloorDataDetail',
      headers: {
        'Content-Type': 'application/json;charset=UTF-8',
        'pageNum': 1,
        'pageSize': 10
      },
      method: 'get',
      params:params
    })
  }
  export function getFloorData(rowId) {
    return request({
        url: '/operate/firstpageFloors/getFloorDataById/'+rowId,
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'GET',
    })
  }
  
  export function updateDataList(data) {
    return request({
        url: '/operate/firstpageFloors',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'put',
        data
    })
  }
  export function addDataList(data) {
    return request({
        url: '/operate/firstpageFloors/saveFloorData',
        headers: {
            'Content-Type': 'application/json;charset=UTF-8'
        },
        method: 'POST',
        data
    })
  }